package com.wufan.day03;

/**
 * @author SongWufan
 * @date 2021/3/8 21:35
 */
public class PassObject {
    public void printAreas(Circle c, int time) {
        System.out.println("Radius\tArea");
        //设置圆的半径
        for (int i = 1; i <= time; i++) {
            c.radius = i;
            double area = c.findArea();
            System.out.println(c.radius + "\t" +area);
        }
        c.radius = ++time;
    }

    public static void main(String[] args) {
        PassObject passObject = new PassObject();
        Circle c = new Circle();
        passObject.printAreas(c, 5);
        System.out.println("now radius is："+c.radius);
    }
}
